import com.cn.Mapper.shopMapper.ShopMapper;
import com.cn.entity.shop.Shop;
import com.cn.util.SqlsesstionUtil;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

/**
 * @ClassName testShop
 * @Description TODO
 * @Author yujiajing
 * @Date 2022/10/14 16:41
 * @Version 1.0
 */
public class testShop {
    @Test
    public  void showAll(){
        SqlSession sqlSession= SqlsesstionUtil.getSqlSession();
        ShopMapper shopMapper=sqlSession.getMapper(ShopMapper.class);
        List<Shop>shopList =shopMapper.showShop();
        System.out.println(shopList.toString());
    }
    @Test
    public  void deleteShop(){
        SqlSession sqlSession= SqlsesstionUtil.getSqlSession();
        ShopMapper shopMapper=sqlSession.getMapper(ShopMapper.class);
        shopMapper.deleteShopById("1");
    }
    @Test
    public  void insertShop(){
        SqlSession sqlSession= SqlsesstionUtil.getSqlSession();
        ShopMapper shopMapper=sqlSession.getMapper(ShopMapper.class);
        shopMapper.insertShop("2","1","1","1","1");
    }
}
